import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = false;

//引入index.scss 全局样式
import "./assets/css/index.scss";

// #引入flexible帮助转化 px to rem
import "lib-flexible/flexible";

//引入过滤器函数
import * as filters from "@/filters/getTime";
//循环注册全局过滤器
Object.keys(filters).forEach((key) => {
	Vue.filter(key, filters[key]);
});


// 自动按需引入vant
import { Button,Form,Field,Tab, Tabs,Icon,NoticeBar,Overlay,Rate,Sidebar, SidebarItem,Card, GoodsAction, GoodsActionIcon, GoodsActionButton,Stepper,Popup } from "vant";
Vue.use(Button)
.use(Form)
.use(Field)
.use(Tab)
.use(Tabs)
.use(Icon)
.use(NoticeBar)
.use(Overlay)
.use(Rate)
.use(Sidebar)
.use(SidebarItem)
.use(Card)
.use(GoodsAction)
.use(GoodsActionIcon)
.use(GoodsActionButton)
.use(Stepper)
.use(Popup)

new Vue({
	router,
	store,
	render: (h) => h(App),
}).$mount("#app");
